package com.situ.stmall.controller.api;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.situ.stmall.service.GoodsSortService;

/**
 * 获取商品分类信息的接口
 * @author bobzyh
 *
 */
@RestController
@RequestMapping("/api/goodsSort")
public class APIGoodsSortController {

	@Autowired
	private GoodsSortService goodsSortService;
	/**
	 * 获取一级分类
	 */
	@GetMapping("/getParent")
	public List getParent() {
		// 1. 获取参数
		// 2. 调用Service
		List list = goodsSortService.getParent();
		// 3. 返回数据
		return list;
	}
}
